<?php 
  // SimpleController.class.inc
  // SimpleVC
  //     Base class for SimpleVC Controllers
  // June 12, 2010
  
class SimpleController {
    // This variable stores values which will be used by the View to build
    // the display.  Values are assigned with the "assign" function (or you can
    // set them directly).
    protected $view;
    
    public function __construct() {
        $_template = array();
    }
    
    // GET methods should be used to get data, but never set it.
    public function get() { return true; }
    
    // POST methods should be used when posting new data to the server.
    public function post() { return true; }
    
    // Assign a name/value pair to the view.
    protected function assign($name, $value) {
        $this->view[$name] = $value;
        return true;
    }
    
    // Return the view array.
    public function getTemplateValues() {
        return $this->view;
    }
}